package com.isoftstone.project.system.mapper;

import com.isoftstone.framework.domain.Page;
import com.isoftstone.project.system.domain.SysRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by admin on 16/5/11.
 *
 */

@Repository
public interface SysRoleMapper {

    SysRole getRoleById(@Param("roleId") String roleId)throws Exception;

    SysRole getRoleByCode(@Param("roleCode") String roleCode)throws Exception;

    SysRole getRoleByCodeName(@Param("roleName") String roleName)throws Exception;

    List<SysRole> getRolelistPage(Page page) throws Exception;

    List<SysRole> getRole(@Param("userId")String userId) throws Exception;

    void saveRole(SysRole role)throws Exception;

    void updateRole(SysRole role)throws Exception;

    /**批量删除
     * @param roleId
     * @throws Exception
     */
    void deleteRole(String roleId)throws Exception;

}
